<?php

class Exportfile 
{
	private $output;
	private $nome_arquivo;
	
	public function __construct($nome_arquivo, $output) 
	{
		$this->nome_arquivo = $nome_arquivo;
		$this->output = $output;	
	}
	
	public function excel()
	{
		//header("Content-type: application/msexcel");
		//header("Content-Disposition: attachment; filename=$this->nome_arquivo");
		
		echo $this->output;
	}
	
	public function pdf()
	{
		include 'dompdf/dompdf.php';
		
		//require("dompdf/dompdf.php");
		
		$dompdf = new DOMPDF();
		
		$dompdf->load_html($this->output);
		$dompdf->render();
		$dompdf->stream($this->nome_arquivo);
	}
}

?>
